package com.hqx.oop;

public class MethodDynamicParameter {
    public static void main(String[] args) {
        show(1);
        show("111");
        show("1","2","3");

    }

    public static void show(int i) {
        System.out.println("show(int)");
    }

    public static void show (String str) {
        System.out.println("show（String）");
    }
    public static void show(String ... str) {
        System.out.println("show(String ... str)");
        for (int i = 0;i < str.length; i++) {
            System.out.println(str[i]);
        }
    }
    //不能与上一个方法同时存在
//    public static void show(String [] str) {
//
//    }

}
